#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time: 2022/12/27 16:03
# @Author: 周健
# @Email: 907614893@qq.com
# @File：search_page.py
from pages.base_page import BasePage
from appium.webdriver.common.mobileby import MobileBy as By

class SearchPage(BasePage):
    huoguo_locator = (By.ID,'com.gfeng.daydaycook:id/historyTv')
    work_locator = (By.XPATH,'//android.widget.TextView[@text=\"作品\"]')
    user_locator= (By.XPATH,'//android.widget.TextView[@text=\"用户\"]')

    # 点击火锅
    def click_huoguo(self):
        self.driver.find_element(*self.huoguo_locator).click()
    # 点击作品
    def click_work(self):
        self.driver.find_element(*self.work_locator).click()
    # 点击用户
    def click_user(self):
        self.driver.find_element(*self.user_locator).click()